//
//  PLVVodPlayerSkin.h
//  PolyvVodSDK
//
//  Created by BqLin on 2017/10/26.
//  Copyright © 2017年 POLYV. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <PLVVodSDK/PLVVodPlayerSkinProtocol.h>
#import <PLVVodSDK/PLVVodVideo.h>
#import "PLVVodGestureIndicatorView.h"
#import "DPHFTopView.h"
#import "PLVVodFullscreenView.h"
#import "PLVVodShrinkscreenView.h"
#import "DPQingxiSettingView.h"
#import "DPAllDegreeIndicateView.h"
@class PLVVodAudioCoverPanelView;

@interface PLVVodPlayerSkin : UIViewController<PLVVodPlayerSkinProtocol>

#pragma mark - PLVVodPlayerSkinProtocol 重新声明
@property (nonatomic,strong) DPQingxiSettingView *ylSetttinView;
/// 弱引用的播放器
@property (nonatomic, weak) IBOutlet PLVVodPlayerViewController *delegatePlayer;

/// 指导页面隐藏导航栏
@property (nonatomic, assign) BOOL shouldHideNavigationBar;

/// 指导页面状态栏隐藏
@property (nonatomic, assign) BOOL shouldHideStatusBar;

/// 指导页面状态栏样式
@property (nonatomic, assign) UIStatusBarStyle statusBarStyle;

// 播放速率
@property (nonatomic, assign) double playbackRate;

/// 是否播放本地视频
@property (nonatomic, assign) BOOL localPlayback;

#pragma mark 控件

/// 播放/暂停按钮
@property (nonatomic, weak) IBOutlet UIButton *playPauseButton;

/// 时间标签
@property (weak, nonatomic) UILabel *timeLabel;
//@property (weak, nonatomic) IBOutlet UILabel *ctTimeLb;
@property (nonatomic,strong) UILabel *ctTimeLabel;

/// 缓冲进度
@property (weak, nonatomic) IBOutlet UIProgressView *bufferProgressView;

/// 播放进度滑杆
@property (weak, nonatomic) IBOutlet UISlider *playbackSlider;

/// 亮度滑杆
@property (nonatomic, weak) IBOutlet UISlider *brightnessSlider;

/// 音量滑杆
@property (nonatomic, weak) IBOutlet UISlider *volumeSlider;
@property (nonatomic, strong) UILabel *ylLabel;
@property (nonatomic,strong) UISlider *hVolumeSlider;//右侧view的音量滑竿
/// 全屏/半屏按钮
@property (nonatomic, weak) IBOutlet UIButton *fullShrinkscreenButton;

#pragma mark - 额外

/// 字幕标签
@property (weak, nonatomic) IBOutlet UILabel *subtitleLabel;

/// 手势指示器
@property (strong, nonatomic) IBOutlet PLVVodGestureIndicatorView *gestureIndicatorView;
@property (nonatomic,strong) DPAllDegreeIndicateView *brightIndView;
@property (nonatomic,strong) DPAllDegreeIndicateView *volumIndView;
@property (nonatomic,strong) DPAllDegreeIndicateView *playIndView;
@property (nonatomic,strong) DPAllDegreeIndicateView *playSliderView;
@property (nonatomic,strong) UIEnlargeButton *fPlayBtn;
@property (nonatomic,assign) BOOL isSlidebar;

/// 载入指示器
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *loadingIndicator;

/// 皮肤覆盖层，显示弹幕
@property (nonatomic, strong) UIView *skinMaskView;

/// 是否启用弹幕
@property (nonatomic, assign) BOOL enableDanmu;
@property (nonatomic, copy) void (^enableDanmuChangeHandler)(PLVVodPlayerSkin *skin, BOOL enableDanmu);

@property (nonatomic, strong) UIImageView *vTopView;
@property (nonatomic,strong) DPHFTopView *hTopView;
@property (nonatomic, strong) UIImageView *rightControlView;
@property (weak, nonatomic) IBOutlet UIImageView *shrinkBottomView;
@property (strong, nonatomic) UIImageView *fullBottomView;
@property (strong, nonatomic) UIImageView *fBottView;
/// 半屏皮肤
@property (strong, nonatomic) IBOutlet PLVVodShrinkscreenView *shrinkscreenView;

/// 全屏皮肤
@property (strong, nonatomic) IBOutlet PLVVodFullscreenView *fullscreenView;
@property (nonatomic, copy) void(^lockScreenClickBlock)(BOOL isLockScreen);
@property (strong, nonatomic)  UILabel *durationLb;
@property (nonatomic,strong) UILabel *ntimeLb;
@property (nonatomic,strong) UIEnlargeButton *qingxiBtn;
@property (nonatomic,strong) UIEnlargeButton *suduBtn;
@property (nonatomic,strong) UIEnlargeButton *fullZanBtn;
@property (nonatomic,strong) UILabel *fullZLb;
@property (nonatomic,strong) UILabel *fullTextLb;
@property (nonatomic,assign) BOOL  iszan;
@property (nonatomic,assign) BOOL isNeedRotate;
@property (strong, nonatomic)  UIButton *lockScreenBtn;
@property (nonatomic,assign) BOOL isLubo;


/** 播放器交互事件回调*/
// ^returnButtonClickBlock：小屏状态下点击reture按钮才会触发，全屏状态下点击return则回到小屏状态
@property (nonatomic, copy) void(^returnButtonClickBlock)(BOOL isFull);
@property (nonatomic, copy) void(^danmuBtnClickBlock)(BOOL isDanmuOpen);
@property (nonatomic, copy) void(^voicebtnClickBlock)(BOOL isVoiceOpen);

@property (nonatomic, copy) void(^playButtonClickBlock)(void);
@property (nonatomic, copy) void(^pauseButtonClickBlock)(void);
@property (nonatomic, copy) void(^fullScreenButtonClickBlock)(void);
@property (nonatomic, copy) void(^smallScreenButtonClickBlock)(void);
@property (nonatomic, copy) void(^editBtnClickBlock)(void);
@property (nonatomic, copy) void(^slideValueChangedBlock)(CGFloat value);
@property (nonatomic, copy) void(^tapPlayerScreenCallBackBlock)(void);
@property (nonatomic, copy) void(^tapVtopviewBlock)(void);
@property (nonatomic, copy) void(^clickFullZanBlock) (BOOL isZan);
@property (nonatomic,assign)  BOOL isLockScreen;
- (void)resetFullZanFrameWithText:(NSString *)zanNum zanState:(BOOL)iszaned;
//设置播放速率变化后回调---------
- (void)setSelectedPlaybackRateDidChangeBlock:(void (^)(double))selectedPlaybackRateDidChangeBlock;
- (void)showGestureIndicator;
- (void)showBrightnessGestureIndicator;
- (void)showVolumeGestureIndicator;
- (void)showPlayProgressGestureIndicator;
- (void)hideGestureIndicator;
- (void)hideBrightnessGestureIndicator ;
- (void)hidevolumeGestureIndicator ;
- (void)hidePlayProgressGestureIndicator;
- (void)hideOrShowPlaybackControl;

- (void)setUpPlaybackMode:(PLVVodVideo *)video;
- (void)updatePlayModeContainView:(PLVVodVideo *)video;

- (void)updateAudioCoverAnimation:(BOOL)isPlaying;
- (void)updateUIForTraitCollection:(UITraitCollection *)collection;

- (void)sendDanmuWithContent:(NSString *)content ColorHex:(NSUInteger)colorHex FontSize:(CGFloat)fontSize;
- (void)setTopTitle:(NSString *)title;

- (void)updateSliderTextWithValue:(CGFloat)value;

- (void)shouhuiTcViw;

- (void)refreshVoiceBtnStateWithIsvoiceOpen:(BOOL)isVoiceOpen;
- (void)resetFullBottomState:(BOOL)isLubo;
-(void)refreshVodVolumandBrightFrame:(BOOL)isFull;
- (void)resetSettinViewHidden:(BOOL)isHiddden;
- (void)hideAllIntroView;
- (void)releaseBlock;
@end
